//
//  HeaderImageCell.m
//  SuperNews
//
//  Created by dllo on 16/1/19.
//  Copyright © 2016年 qiang. All rights reserved.
//

#import "HeaderImageCell.h"

@implementation HeaderImageCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubviews];
    }
    return self;
}

- (void)createSubviews
{
    self.backgroundColor = [UIColor whiteColor];
    self.imageV = [[UIImageView alloc] init];
    self.imageV.backgroundColor = [UIColor redColor];
    [self.contentView addSubview:self.imageV];
    
    self.labelTitle = [[UILabel alloc] init];
    self.labelTitle.textAlignment = NSTextAlignmentCenter;
    self.labelTitle.numberOfLines = 0;
    self.labelTitle.textColor = [UIColor whiteColor];
//    self.labelTitle.backgroundColor = [UIColor yellowColor];
    [self.contentView addSubview:self.labelTitle];
    
    self.labelNumber = [[UILabel alloc] init];
    self.labelNumber.textAlignment = NSTextAlignmentCenter;
    self.labelNumber.font = [UIFont systemFontOfSize:13.0];
    self.labelNumber.textColor = [UIColor colorWithRed:0.7886 green:0.7804 blue:0.7968 alpha:1.0];
//    self.labelNumber.backgroundColor = [UIColor greenColor];
    [self.contentView addSubview:self.labelNumber];
    
    
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.imageV.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height / 4.0);
    self.labelTitle.frame = CGRectMake(10, 20, [UIScreen mainScreen].bounds.size.width - 20, [UIScreen mainScreen].bounds.size.height / 8.0);
    self.labelNumber.frame = CGRectMake(10, [UIScreen mainScreen].bounds.size.height / 8.0 + 20, [UIScreen mainScreen].bounds.size.width - 20, [UIScreen mainScreen].bounds.size.height / 8.0 - 40);
}

@end
